"""Test data"""


from django.conf import settings
from django.db import models as db_models
from django_ldap import models as ldap_models


init_ldif = """
dn: ou=test,BASE
objectClass: organizationalUnit
objectClass: top
ou: test

dn: cn=testuser1,ou=test,BASE
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: testuser1
sn: test1

dn: cn=testuser2,ou=test,BASE
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: testuser2
sn: test2

dn: cn=testgroup,ou=test,BASE
objectClass: groupOfNames
objectClass: top
cn: testgroup
member: cn=testuser1,ou=test,BASE

dn: ou=referral,ou=test,BASE
objectClass: organizationalUnit
objectClass: top
ou: referral

dn: cn=testuser1,ou=referral,ou=test,BASE
objectClass: referral
objectClass: extensibleObject
cn: testuser1
ref: ldap://SERVER/cn=testuser1,ou=test,BASE

""".replace('BASE', settings.LDAP_BASE).replace('SERVER', settings.LDAP_SERVER)

class db_model(db_models.Model):
    pass

class ldap_model(ldap_models.Person):
    class Ldap:
        base = 'ou=test,%s' % settings.LDAP_BASE
        rdn = 'cn'
        objectClass = 'inetOrgPerson'
        filter = '(objectClass=inetOrgPerson)'
